<form class="layui-form m20">
    <div class="layui-form-item">
        <label class="layui-form-label">专题标题</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" lay-verify="required" placeholder="请输入标题" name="name" value="{$topic.name}">
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">专题摘要</label>
        <div class="layui-input-block">
            <textarea class="layui-textarea" placeholder="请输入摘要" name="desc">{$topic.desc}</textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">专题来源</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" placeholder="请输入来源" name="source" value="{$topic.source}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">专题作者</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" placeholder="请输入作者" name="author" value="{$topic.author}">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">专题封面</label>
        <div class="layui-input-block">
            <div class="cover-upload">
                <img data-path="__UPLOAD__" id="edit-cover-src" data-src="{$topic.cover}" {empty name="topic.cover"}class="hidden"{else/}src="__UPLOAD__/{$topic.cover}"{/empty}>
                <div class="site-demo-upbar mt10">
                    <input type="file" name="cover" class="layui-upload-file"  lay-ext="jpg|png|gif" id="edit-cover">
                </div>
            </div>
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">领导讲话</label>
        <div class="layui-input-block">
            <!-- 加载编辑器的容器 -->
            <script id="edit-container-{$topic.id}" name="content" type="text/plain">{$topic.content}</script>
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">文件通知</label>
        <div class="layui-input-block">
            <!-- 加载编辑器的容器 -->
            <script id="edit-container-file-{$topic.id}" name="content_file" type="text/plain">{$topic.content_file}</script>
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">图片展示</label>
        <div class="layui-input-block">
            {present name="topic.gallerys"}
            <div class="image-list">
                <ul class="clearfix">
                    {volist name='topic.gallerys' id='gallery' key='key'}
                    <li class="fl mr10 pr">
                        <img src="__UPLOAD__/{$gallery.file_path}">
                    </li>
                    {/volist}
                </ul>
            </div>
            {/present}
            <div id="edituploader">
                <div class="queueList">
                    <div id="dndArea" class="placeholder">
                        <div id="editfilePicker"></div>
                        <p>或将照片拖到这里，单次最多可选20张</p>
                    </div>
                </div>
                <div class="statusBar" style="display:none;">
                    <div class="progress">
                        <span class="text">0%</span>
                        <span class="percentage"></span>
                    </div><div class="info"></div>
                    <div class="btns">
                        <div id="filePicker2"></div><div class="uploadBtn">开始上传</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">专题排序</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" placeholder="10" name="sort" value="{$topic.sort}">
        </div>
    </div>
    <div class="layui-input-block">
        <input type="hidden" name="id" value="{$topic.id}">
        <input type="hidden" name="content_image" id="gallery" value="{$topic.content_image}">
        <a class="layui-btn save-btn layui-btn-normal" lay-filter="save" lay-submit>保存</a>
        <input type="reset" class="layui-btn layui-btn-primary goback" value="重置">
    </div>
</form>
<script>
    UE.getEditor("edit-container-{$topic.id}", {
        authHeight: false
    });
    UE.getEditor("edit-container-file-{$topic.id}", {
        authHeight: false
    });
</script>
<script src="__LIB__/webuploader/editupload.js"></script>